package com.home.zqt.platform.domain;

import lombok.Data;
import org.beetl.sql.core.annotatoin.Table;
import org.beetl.sql.core.orm.OrmCondition;
import org.beetl.sql.core.orm.OrmQuery;

import java.util.List;

/**
 * @author soon
 * @description: TODO
 * @date 2019-06-01 12:32
 **/
@Data
@Table(name = "mj_menu")
@OrmQuery(value = {
        @OrmCondition(target = MJMenu.class, attr = "parentMenuId", targetAttr = "id", alias = "parent", type = OrmQuery.Type.ONE),
        @OrmCondition(target = MJMenuAuthorityRef.class, attr = "id", targetAttr = "menuId", alias = "marList", type = OrmQuery.Type.MANY)
})
public class MJMenu extends BaseDomain {

    private String name;
    private String code;
    private Long parentMenuId;
    private Integer displayOrder = 0;
    private MJMenu parent;
    private List<MJMenuAuthorityRef> marList;

    public MJMenu() {
        super();
    }
}

